<!DOCTYPE html>
<html>
<head>
    <title>Look! I'm CRUDding</title>
    <link rel="stylesheet" href="//cdn.bootcss.com/twitter-bootstrap/3.0.3/css/bootstrap.min.css">
</head>
<body>
<div class="container">

    <nav class="navbar navbar-inverse">
        <div class="navbar-header">
            <a class="navbar-brand" href="{{ URL::to('api') }}">Api Alert</a>
        </div>
        <ul class="nav navbar-nav">
            <li><a href="{{ URL::to('api') }}">View All Json</a></li>
            <li><a href="{{ URL::to('api/create') }}">Create a Record</a>
        </ul>
    </nav>

    <h1>All the Records</h1>

    <!-- will be used to show any messages -->
    @if (Session::has('message'))
    <div class="alert alert-info">{{ Session::get('message') }}</div>
    @endif

    <h1>Create a Recor,ID {{ $num }}</h1>

    <!-- if there are creation errors, they will show here -->
    {{ HTML::ul($errors->all()) }}

    {{ Form::open(array('url' => 'api', 'files' => true)) }}

    <div class="form-group">
        {{ Form::label('title', 'Title') }}
        {{ Form::text('title', Input::old('title'), array('class' => 'form-control')) }}
    </div>

    <div class="form-group">
        {{ Form::label('poster', 'Poster') }}
        {{ Form::file('poster', Input::old('poster'), array('class' => 'form-control')) }}
    </div>

    <div class="form-group">
        {{ Form::label('video', 'Video') }}
        {{ Form::file('video', Input::old('video'), array('class' => 'form-control')) }}
    </div>

    {{ Form::submit('Create the Nerd!', array('class' => 'btn btn-primary')) }}

    {{ Form::close() }}

</div>
</body>
</html>